Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ostream metric exporter #1196

Merged
merged 16 commits into from
Feb 19, 2022
Merged

Conversation

esigo
Copy link
Member

@esigo esigo commented Feb 6, 2022

related to #1091 and #1092 (issue)

For a Metric Reader implementation e.g. Periodic exporting MetricReader
we need a metric exporter.

Changes

This PR implements basic ostream metric exporter based on the current api.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@codecov
Copy link

codecov bot commented Feb 7, 2022

Codecov Report

Merging #1196 (99b8bcb) into main (1026ec3) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1196      +/-   ##
==========================================
- Coverage   92.99%   92.96%   -0.02%     
==========================================
  Files         196      196              
  Lines        7038     7040       +2     
==========================================
  Hits         6544     6544              
- Misses        494      496       +2     
Impacted Files Coverage Δ
...pi/include/opentelemetry/context/runtime_context.h 97.50% <ø> (ø)
...nclude/opentelemetry/sdk/metrics/metric_exporter.h 50.00% <0.00%> (-50.00%) ⬇️
sdk/test/metrics/meter_provider_sdk_test.cc 78.38% <0.00%> (-2.17%) ⬇️

@esigo esigo changed the title [WIP] Ostream metrics exporter Ostream metric exporter Feb 7, 2022
@esigo esigo marked this pull request as ready for review February 7, 2022 21:07
@esigo esigo requested a review from a team February 7, 2022 21:07
* @param records a span of unique pointers to metrics recordables
*/
sdk::common::ExportResult Export(
const nostd::span<std::unique_ptr<opentelemetry::sdk::metrics::Recordable>> &records) noexcept
Copy link
Member

@lalitb lalitb Feb 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we modify this class, and the base class to accept span of MetricData instead of recordable?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for adding it.

@lalitb lalitb merged commit 9502339 into open-telemetry:main Feb 19, 2022
@esigo esigo deleted the ostream-metrics-exporter branch February 19, 2022 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants